package com.yy.chapter6.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author yangyao
 * @Description: 自定义注解拦截校验信息
 * @date 2018/10/23 10:16
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Constraint(validatedBy = MyValidImpl.class)
public @interface MyValid {

    String values();

    String message() default "字段信息不存在";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
